package com.medical.logback.utils;

/**
 * @Author 高子峰
 * @Date 2022/7/5 16:16
 * @Version 1.0
 */
public class SplitUtils {


    /**
     * @param string   字符串
     * @param splitStr 想要以什么方式切割，比如: ，  、  ~ 等等
     */
    public static void split(String string, String splitStr) {
        String remainString = string;
        int startIndex = 0;
        int endIndex = 0;
        while (true) {
            endIndex = remainString.indexOf(splitStr, startIndex);
            if (endIndex <= 0) {
                break;
            }
            remainString.substring(startIndex, endIndex);
            startIndex = endIndex + 1;
        }
    }

}
